import request from '@/utils/request'

// 查询货物质检列表
export function listRecord(query) {
  return request({
    url: '/source/check/record/list',
    method: 'get',
    params: query
  })
}// 查询质检人
export function listRecords() {
  return request({
    url: '/source/check/record/deptUsers',
    method: 'get',

  })
}

// 查询货物质检详细
export function getRecord(checkId) {
  return request({
    url: '/source/check/record/' + checkId,
    method: 'get'
  })
}


// 新增货物质检
export function addRecord(data) {
  return request({
    url: '/source/check/record/add',
    method: 'post',
    data: data
  })
}

// 修改货物质检
export function updateRecord(data) {
  return request({
    url: '/source/check/record/',
    method: 'put',
    data: data
  })
}

// 删除货物质检
export function delRecord(checkId) {
  return request({
    url: '/source/check/record/' + checkId,
    method: 'delete'
  })
}

export function tongyiYes(checkId) {
  return request({
    url: '/source/check/record/tongyiYes/' + checkId,
    method: 'post'
  })
}

export function tongyiNo(checkId) {
  return request({
    url: '/source/check/record/tongyiNo/' + checkId,
    method: 'post'
  })
}

export function countProduct() {
  return request({
    url: '/source/check/record/countProduct' ,
    method: 'post'
  })
}



